/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to marcus@lateralminds.com.au so I can send you a copy immediately.
 *
 * @copyright  Copyright (c) 2008 Lateral Minds (http://www.lateralminds.com.au)
 * @version    $Id$
 * @license    New BSD License
 */

package com.lateralminds.alfresco.scripting;

import javax.faces.context.FacesContext;

import org.alfresco.repo.template.BaseTemplateProcessorExtension;

/**
 * Utilities available from FreeMarker templates
 * 
 * @author Marcus Nyeholt
 *
 */
public class TemplateUtils extends BaseTemplateProcessorExtension
{
    public String getContext()
    {
        if (FacesContext.getCurrentInstance() != null) {
            return FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
        }
        
        return "";
    }
}